<?php 
$this->load->view('admin/_header2');
?>
<script language=javascript src="<?=site_url('js/admin.js');?>"></script>
<script language=javascript src="<?=site_url('js/vflight.js');?>"></script>
<script language=javascript src="<?=site_url('js/validator.js');?>"></script>
<?php
echo form_open("admin/vflight/doaddvflight",array("onsubmit" =>"return CheckFormSubmit(this)"));

 ?><div class="dvfbody2" style="border:0px">
<div id="dvstep1">
	<div style="font-weight:bold;">Flight Setting</div>
<table  border=1 width=100% bordercolor="#B6CEFF" >
	<tr height=25 width=125 >
		<td width=120 align=right >From Port:</td>
		<td width=265 ><input type=text name="FromPort"  maxlength=3 verify="M" desc="Fromport "  class="txd"  /></td>
		<td width=300 ></td>
	</tr>
	<tr>
		<td align=right>Dest Port:</td>
		<td><input type=text name="DestPort" maxlength=3 verify="M" desc="Destport "  class="txd"  /></td>
		<td></td>
	</tr>
	<tr>
		<td align=right>Stop Port:</td>
		<td>
			<input type=text name="stopport[]" maxlength=3 class="txd"  style="width:43px"/>/
			<input type=text name="stopport[]" maxlength=3 class="txd"  style="width:43px"/>/
			<input type=text name="stopport[]" maxlength=3  class="txd"  style="width:43px"/>			
		</td>
		<td></td>
	</tr>
	
	<tr height=25 >
		<td align=right>Flight Date:</td>
		<td>
			<input type="text" name="FlightDate1" verify="M" desc="Flight Date1 " value="<?=$FlightDate1; ?>" class="txdatec" />
			<input type="text" name="FlightDate2" verify="M" desc="Flight Date2 " class="txdatec" />
		</td>
		<td></td>
	</tr>
	
	
	<tr height=25 >
		<td align=right>Flight Time:</td>
		<td>
			<input type="text" name="departTime" verify="M" desc="departTime " maxlength=4 class="txd" style="width:43px" />
			<input type="text" name="ArrivalTime"  verify="M" desc="ArrivalTime " maxlength=4 class="txd" style="width:43px" />
		</td>
		<td>such as "0000-1200"</td>
	</tr>
	
	<tr height=25 >
		<td align=right>Flight No:</td>
		<td>
			<input type="text" name="FlightNo" verify="M" desc="FlightNo " maxlength=6 class="txd" />
		</td>
		<td>such as "CA0001"</td>
	</tr>
	
	<tr height=25 >
		<td align=right>Plane Type:</td>
		<td>
			<input type="text" name="Planetype" verify="M" desc="Planetype " maxlength=6 class="txd" />
		</td>
		<td></td>
	</tr>
	
	
	
	<tr height=25 >
		<td align=right>Week Available:</td>
		<td><?
		$arweek=array("Sun","Mon","Tue","Wed","Thu","Fri","Sat");
		for($i=0;$i<7;$i++)
		{
			$data = array(
			    'name'        => 'WeekAvailable[]',
			    'id'          => 'chkweekavail'.$i,
			    'value'       => $i,
			    'checked'     => TRUE
		    );
		echo form_checkbox($data);
		echo form_label($arweek[$i],'chkweekavail'.$i);

		}
		
		?>
		</td>
		<td></td>
	</tr>
	<tr height=25 >
		<td colspan=2 align=center style="display:none" >
			<input type="button" name="button" value="Next step" onclick="shownextstop(2)" class="txd" />
		</td>
		<td></td>
	</tr>
</table>
</div>
<div id="dvstep2">
<div style="font-weight:bold;">Class Setting</div>
	<table border=1 bordercolor="#B6CEFF" id="tbGroupPolicy_2" >
		<tr height=28 style="background-color:#F0F0F0;">
			<td width=102 align="center">Class Code</td>
			<td width=100 align="center">Avail Seat</td>
			<td width=100 align="center">Amount</td>
			<td width=100 align="center">Note </td>
			<td><a href="javascript://" class=orange onclick="addmodelbyIndex1(2,iMaxI++)">add Class</a></td>
		</tr>
	</table>
</div>

<div style="text-align:center">
	<input type="submit" name="button" value="Create"  />
</div>
<?php
echo form_close();
?>
</div>


<div id="dvModel" style="display:none;">
	
	<table id="tbModel_2" width=614 align="center">
		<tr height=30 >
			<td><input type="text" name="ClassCode[]" value="" verify="M" desc="Avail Seat" class="txd" style="width:60px" /></td>
			<td><input type="text" name="AvailSeat[]" value="" verify="N" desc="Avail Seat" class="txd" style="width:60px" /></td>
			<td><input type="text" name="Amount[]"  value="0" verify="MN" desc="Amount" class="txd" style="width:80px"   /></td>
			<td><input type="text" name="Note[]"  value="" verify="" desc="Note" class="txd"   /></td>
			<td>
				<a href=# title="del" style="color:red;" onclick="return delnomalclass(this);" >delete</a>
			</td>
		</tr>
	</table>
</div>
<script language="javascript">
	var iMaxI=1;
	$(document).ready(function () {
		initinputValue();
		addmodelbyIndex1(2,iMaxI);
		$('.txdatec').datepick({monthsToShow:2});
	});
	
	//显示下一步
	function shownextstop(istep)
	{
		//$("#dvstep1,#dvstep2").hide();
		$("#dvstep"+istep).show();
	}
	
</script>
<?php $this->load->view('admin/_footer1') ?>